﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace Palsta.Core.Manifest
{
    class DomEventHandler
    {
        #region Members

        private String match;
        private String ruleSetAction;

        #endregion

        #region Constructors

        public DomEventHandler()  : this("")
        {
        }

        public DomEventHandler(String match)
        {
            this.match = match;
        }
        #endregion

        #region Accessors

        public virtual String Match
        {
            get
            {
                return this.match;
            }
            set
            {
                this.match = value;
            }
        }

        public virtual String RuleSetAction
        {
            get
            {
                return this.ruleSetAction;
            }
            set
            {
                this.ruleSetAction = value;
            }
        }

        #endregion

        #region Methods

        #endregion

        #region Override Operators

        public static Boolean operator ==(DomEventHandler eh, String tar)
        {
            return eh.Equals(tar);
        }

        public static Boolean operator !=(DomEventHandler eh, String tar)
        {
            return !eh.Equals(tar);
        }

        public override bool Equals(object o)
        {
            if (o is String)
            {
                return this.match.Equals((String)o);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return 0;
        }

        #endregion

        #region Static Methods

        #endregion
    }
}
